export default {
    props: ["value"],
    computed: {
        ssid() {
            return this.value.ssid
        },
        securityType() {
            if (this.value.securityType == 1) { //开放网络
                if (this.value.rssi == 1) {
                    return '/res/image/icon_wifi_signal_0.png'
                } else if (this.value.rssi == 2) {
                    return '/res/image/icon_wifi_signal_1.png'
                } else if (this.value.rssi == 3) {
                    return '/res/image/icon_wifi_signal_2.png'
                } else if (this.value.rssi == 4) {
                    return '/res/image/icon_wifi_signal_3.png'
                } else {
                    return '/res/image/icon_wifi_signal_2.png'
                }
            } else {
                if (this.value.rssi == 1) {
                    return '/res/image/icon_wifi_signal_lock_0.png'
                } else if (this.value.rssi == 2) {
                    return '/res/image/icon_wifi_signal_lock_1.png'
                } else if (this.value.rssi == 3) {
                    return '/res/image/icon_wifi_signal_lock_2.png'
                } else if (this.value.rssi == 4) {
                    return '/res/image/icon_wifi_signal_lock_3.png'
                } else {
                    return '/res/image/icon_wifi_signal_lock_2.png'
                }
            }
        },
        netType() {
            let str = "";
            let securityType = this.value.securityType;
            switch (securityType) {
                case 0:
                    str = "不安全的网络连接";
                    break;
                case 1:
                    str = "开放";
                    break;
                case 2:
                    str = "加密(WEP)";
                    break;
                case 3:
                    str = "加密(PSK)";
                    break;
                case 4:
                    str = "加密(WPA)";
                    break;
                default:
                    str = "可用的";
                    break;
            }
            return str;
        }
    }
}